// uview框架uToast组件适配
class uToastClass{
	constructor(vm, param) {
		this.vm = vm;
		this.param = param;
		this.default={
			loading:param.loading || false,
			message:param.message || 'ddd',
			icon:param.icon || '-',
			type:param.type || 'error',
			params:param.params || '-',
			duration:param.duration || 2000,
			complete(){
				param.complete()
			}
		}
	}
	show() {
		this.vm.$refs.uToast.show(this.default)
	}
}

export const uToast = {
	show:function(vm,param){
		let fun=new uToastClass(vm,param)
		return fun.show()
	}
}
